package com.mb.demo.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;


@Configuration // 声明类为系统配置类
@EnableScheduling // 开启调度任务
public class MyScheduleConfig {
    @Scheduled(cron = "0 0/1 * * * ?") // 定义调度器
    public void job1() {
        System.out.println("测试一手");
    }
}
